//轮播
	//轮播图片路径
	var lbImgArr = [
		"Aimg1/lb1.png",
		"Aimg1/lb2.png",
		"Aimg1/lb3.png",
		"Aimg1/lb1.png"
	];
	//循环创建创建轮播图
	for(var i = 0; i < lbImgArr.length; i++) {
		var imgEle = $("<img  src=" + lbImgArr[i] + "/>");
		$(".a_show").append(imgEle);
	};
	//循环创建小点
	for(var i = 0; i < lbImgArr.length - 1; i++) {
		var lis = $("<li></li>");
		$(".a_ball").append(lis);
	}
	//轮播图样式
	$(".a_show").css("width", $(".a_wrap").width() * $(".a_show img").length);
	$(".a_show img").css("width", $(".a_show").width() / $(".a_show img").length);
	$(".a_ball li").first().css({
		backgroundColor: "#FE786F",
		border: "none",
	})
	var index = 0;
	//轮播函数
	var changeImg = function() {
		$(".a_ball li").css({
			backgroundColor: "rgba(255,255,255,0.5)",
			border: "0.1rem solid #FFFFFF"
		});
		index++;
		$(".a_ball li").eq(index).css({
			backgroundColor: "#FE786F",
			border: "none"
		});
		$(".a_show").animate({
			left: -$(".a_wrap").width() * index + "px"
		}, 1000)
		if(index >= lbImgArr.length - 1) {
			index = 0;
			$(".a_show").animate({
				left: 0 + "px"
			}, 0)
			$(".a_ball li").eq(index).css({
				backgroundColor: "#FE786F",
				border: "none"
			});
		}
	}
	var wheel = setInterval(changeImg, 2000);


//创建横向图标的函数
var iconArr = ["img2/img1.png",
"img2/img2.png",
"img2/img3.png",
"img2/img4.png",
"img2/img1.png",
"img2/img2.png"
];
var iconTitle=["王者荣誉","天天酷跑","全民突击","热邪传奇","德玛西亚","艾欧尼亚","黑色玫瑰","扭曲丛林"];
$(".b_game").width($(".b_gameList").width() * iconArr.length)
for (var i = 0 ; i < iconArr.length ;i++) {
	var icon = createIcon(iconArr[i],iconTitle[i]);
	$(".b_game").append(icon);
}
function createIcon(imageSrc,title) {
	return $("<li class='b_gameList'><img src=" + imageSrc + " class='b_gameImg' /><span class='b_font2'>" + title + "</span></li>")
};

//循环追加最新视频区域
//视频区域的图片路径数组
var videoImg = [
"img1/video1.png",
"img1/video2.png",
"img1/video3.png",
"img1/video4.png",
"img1/video1.png",
"img1/video2.png",
"img1/video3.png"
];
//for循环追加
for (var i = 0 ;i < videoImg.length  ;i++) {
	var list ;
	var ele = createGift(videoImg[i]);
	if (i % 2 == 0){
		list = $("<li class='b_videoList'></li>");
	};
	list.append(ele);
	$(".b_videoWrap").append(list);
}
//创建视频秀区域元素函数
function createGift (imageSrc) {
	return $("<div class='b_video'><a href='./index13.html'><div class='b_videoImgWrap'><img src=" + imageSrc + " class='b_videoImg' /><span class='b_videoIntro overhidden'>英雄联盟</span><span class='glyphicon glyphicon-play b_videoPlay'></span></div><div class='b_videoWordsWrap'><p class='b_videoWords'>6.1版本单排上分最强打野英雄Tops5排行</p></div></a></div>")
}

